class Admin::AdvertsController < Admin::AdminController
  
  
  def edit
    @advert = Advert.find(params[:id])
  end
  
  def show
    @advert = Advert.find(params[:id])
  end
  
  def update
    @advert = Advert.find(params[:id])
    if @advert.update_attributes(params[:advert])
      flash_notice(:advert_updated)
      redirect_to admin_advert_path(@advert) 
      
    else
      flash_error(:advert_not_updated)
      render :action => "edit" 
      
    end  
  end
  
end
